#pragma once
#include <map>
#include <string>
//cost 100000 means non-support instruction
std::map<std::string, uint32_t> kGasCostTable = {
  {"<invalid>"                   , 0              },
  {"alloca"                      , 100000         },
  {"atomic.notify"               , 100000         },
  {"block"                       , 0              },
  {"br"                          , 2              },
  {"br_if"                       , 3              },
  {"br_on_exn"                   , 100000         },
  {"br_table"                    , 2              },
  {"br_unless"                   , 100000         },
  {"call"                        , 2              },
  {"call_host"                   , 100000         },
  {"call_indirect"               , 3              },
  {"catch"                       , 100000         },
  {"catch_all"                   , 100000         },
  {"data"                        , 100000         },
  {"data.drop"                   , 100000         },
  {"drop"                        , 3              },
  {"drop_keep"                   , 100000         },
  {"elem.drop"                   , 100000         },
  {"else"                        , 2              },
  {"end"                         , 0              },
  {"f32.abs"                     , 100000         },
  {"f32.add"                     , 100000         },
  {"f32.ceil"                    , 100000         },
  {"f32.const"                   , 100000         },
  {"f32.convert_i32_s"           , 100000         },
  {"f32.convert_i32_u"           , 100000         },
  {"f32.convert_i64_s"           , 100000         },
  {"f32.convert_i64_u"           , 100000         },
  {"f32.copysign"                , 100000         },
  {"f32.demote_f64"              , 100000         },
  {"f32.div"                     , 100000         },
  {"f32.eq"                      , 100000         },
  {"f32.floor"                   , 100000         },
  {"f32.ge"                      , 100000         },
  {"f32.gt"                      , 100000         },
  {"f32.le"                      , 100000         },
  {"f32.load"                    , 100000         },
  {"f32.lt"                      , 100000         },
  {"f32.max"                     , 100000         },
  {"f32.min"                     , 100000         },
  {"f32.mul"                     , 100000         },
  {"f32.ne"                      , 100000         },
  {"f32.nearest"                 , 100000         },
  {"f32.neg"                     , 100000         },
  {"f32.reinterpret_i32"         , 100000         },
  {"f32.sqrt"                    , 100000         },
  {"f32.store"                   , 100000         },
  {"f32.sub"                     , 100000         },
  {"f32.trunc"                   , 100000         },
  {"f32x4.abs"                   , 100000         },
  {"f32x4.add"                   , 100000         },
  {"f32x4.convert_i32x4_s"       , 100000         },
  {"f32x4.convert_i32x4_u"       , 100000         },
  {"f32x4.div"                   , 100000         },
  {"f32x4.eq"                    , 100000         },
  {"f32x4.extract_lane"          , 100000         },
  {"f32x4.ge"                    , 100000         },
  {"f32x4.gt"                    , 100000         },
  {"f32x4.le"                    , 100000         },
  {"f32x4.lt"                    , 100000         },
  {"f32x4.max"                   , 100000         },
  {"f32x4.min"                   , 100000         },
  {"f32x4.mul"                   , 100000         },
  {"f32x4.ne"                    , 100000         },
  {"f32x4.neg"                   , 100000         },
  {"f32x4.replace_lane"          , 100000         },
  {"f32x4.splat"                 , 100000         },
  {"f32x4.sqrt"                  , 100000         },
  {"f32x4.sub"                   , 100000         },
  {"f64.abs"                     , 100000         },
  {"f64.add"                     , 100000         },
  {"f64.ceil"                    , 100000         },
  {"f64.const"                   , 100000         },
  {"f64.convert_i32_s"           , 100000         },
  {"f64.convert_i32_u"           , 100000         },
  {"f64.convert_i64_s"           , 100000         },
  {"f64.convert_i64_u"           , 100000         },
  {"f64.copysign"                , 100000         },
  {"f64.div"                     , 100000         },
  {"f64.eq"                      , 100000         },
  {"f64.floor"                   , 100000         },
  {"f64.ge"                      , 100000         },
  {"f64.gt"                      , 100000         },
  {"f64.le"                      , 100000         },
  {"f64.load"                    , 100000         },
  {"f64.lt"                      , 100000         },
  {"f64.max"                     , 100000         },
  {"f64.min"                     , 100000         },
  {"f64.mul"                     , 100000         },
  {"f64.ne"                      , 100000         },
  {"f64.nearest"                 , 100000         },
  {"f64.neg"                     , 100000         },
  {"f64.promote_f32"             , 100000         },
  {"f64.reinterpret_i64"         , 100000         },
  {"f64.sqrt"                    , 100000         },
  {"f64.store"                   , 100000         },
  {"f64.sub"                     , 100000         },
  {"f64.trunc"                   , 100000         },
  {"f64x2.abs"                   , 100000         },
  {"f64x2.add"                   , 100000         },
  {"f64x2.convert_i64x2_s"       , 100000         },
  {"f64x2.convert_i64x2_u"       , 100000         },
  {"f64x2.div"                   , 100000         },
  {"f64x2.eq"                    , 100000         },
  {"f64x2.extract_lane"          , 100000         },
  {"f64x2.ge"                    , 100000         },
  {"f64x2.gt"                    , 100000         },
  {"f64x2.le"                    , 100000         },
  {"f64x2.lt"                    , 100000         },
  {"f64x2.max"                   , 100000         },
  {"f64x2.min"                   , 100000         },
  {"f64x2.mul"                   , 100000         },
  {"f64x2.ne"                    , 100000         },
  {"f64x2.neg"                   , 100000         },
  {"f64x2.replace_lane"          , 100000         },
  {"f64x2.splat"                 , 100000         },
  {"f64x2.sqrt"                  , 100000         },
  {"f64x2.sub"                   , 100000         },
  {"global.get"                  , 3              },
  {"global.set"                  , 3              },
  {"i16x8.add"                   , 100000         },
  {"i16x8.add_saturate_s"        , 100000         },
  {"i16x8.add_saturate_u"        , 100000         },
  {"i16x8.all_true"              , 100000         },
  {"i16x8.any_true"              , 100000         },
  {"i16x8.eq"                    , 100000         },
  {"i16x8.extract_lane_s"        , 100000         },
  {"i16x8.extract_lane_u"        , 100000         },
  {"i16x8.ge_s"                  , 100000         },
  {"i16x8.ge_u"                  , 100000         },
  {"i16x8.gt_s"                  , 100000         },
  {"i16x8.gt_u"                  , 100000         },
  {"i16x8.le_s"                  , 100000         },
  {"i16x8.le_u"                  , 100000         },
  {"i16x8.lt_s"                  , 100000         },
  {"i16x8.lt_u"                  , 100000         },
  {"i16x8.mul"                   , 100000         },
  {"i16x8.ne"                    , 100000         },
  {"i16x8.neg"                   , 100000         },
  {"i16x8.replace_lane"          , 100000         },
  {"i16x8.shl"                   , 100000         },
  {"i16x8.shr_s"                 , 100000         },
  {"i16x8.shr_u"                 , 100000         },
  {"i16x8.splat"                 , 100000         },
  {"i16x8.sub"                   , 100000         },
  {"i16x8.sub_saturate_s"        , 100000         },
  {"i16x8.sub_saturate_u"        , 100000         },
  {"i32.add"                     , 1              },
  {"i32.and"                     , 1              },
  {"i32.atomic.load"             , 100000         },
  {"i32.atomic.load16_u"         , 100000         },
  {"i32.atomic.load8_u"          , 100000         },
  {"i32.atomic.rmw.add"          , 100000         },
  {"i32.atomic.rmw.and"          , 100000         },
  {"i32.atomic.rmw.cmpxchg"      , 100000         },
  {"i32.atomic.rmw.or"           , 100000         },
  {"i32.atomic.rmw.sub"          , 100000         },
  {"i32.atomic.rmw.xchg"         , 100000         },
  {"i32.atomic.rmw.xor"          , 100000         },
  {"i32.atomic.rmw16.add_u"      , 100000         },
  {"i32.atomic.rmw16.and_u"      , 100000         },
  {"i32.atomic.rmw16.cmpxchg_u"  , 100000         },
  {"i32.atomic.rmw16.or_u"       , 100000         },
  {"i32.atomic.rmw16.sub_u"      , 100000         },
  {"i32.atomic.rmw16.xchg_u"     , 100000         },
  {"i32.atomic.rmw16.xor_u"      , 100000         },
  {"i32.atomic.rmw8.add_u"       , 100000         },
  {"i32.atomic.rmw8.and_u"       , 100000         },
  {"i32.atomic.rmw8.cmpxchg_u"   , 100000         },
  {"i32.atomic.rmw8.or_u"        , 100000         },
  {"i32.atomic.rmw8.sub_u"       , 100000         },
  {"i32.atomic.rmw8.xchg_u"      , 100000         },
  {"i32.atomic.rmw8.xor_u"       , 100000         },
  {"i32.atomic.store"            , 100000         },
  {"i32.atomic.store16"          , 100000         },
  {"i32.atomic.store8"           , 100000         },
  {"i32.atomic.wait"             , 100000         },
  {"i32.clz"                     , 105            },
  {"i32.const"                   , 0              },
  {"i32.ctz"                     , 105            },
  {"i32.div_s"                   , 80             },
  {"i32.div_u"                   , 80             },
  {"i32.eq"                      , 1              },
  {"i32.eqz"                     , 1              },
  {"i32.extend16_s"              , 100000         },
  {"i32.extend8_s"               , 100000         },
  {"i32.ge_s"                    , 1              },
  {"i32.ge_u"                    , 1              },
  {"i32.gt_s"                    , 1              },
  {"i32.gt_u"                    , 1              },
  {"i32.le_s"                    , 1              },
  {"i32.le_u"                    , 1              },
  {"i32.load"                    , 3              },
  {"i32.load16_s"                , 3              },
  {"i32.load16_u"                , 3              },
  {"i32.load8_s"                 , 3              },
  {"i32.load8_u"                 , 3              },
  {"i32.lt_s"                    , 1              },
  {"i32.lt_u"                    , 1              },
  {"i32.mul"                     , 3              },
  {"i32.ne"                      , 1              },
  {"i32.or"                      , 1              },
  {"i32.popcnt"                  , 3              },
  {"i32.reinterpret_f32"         , 3              },
  {"i32.rem_s"                   , 80             },
  {"i32.rem_u"                   , 80             },
  {"i32.rotl"                    , 2              },
  {"i32.rotr"                    , 2              },
  {"i32.shl"                     , 2              },
  {"i32.shr_s"                   , 2              },
  {"i32.shr_u"                   , 2              },
  {"i32.store"                   , 3              },
  {"i32.store16"                 , 3              },
  {"i32.store8"                  , 3              },
  {"i32.sub"                     , 1              },
  {"i32.trunc_f32_s"             , 3              },
  {"i32.trunc_f32_u"             , 3              },
  {"i32.trunc_f64_s"             , 3              },
  {"i32.trunc_f64_u"             , 3              },
  {"i32.trunc_sat_f32_s"         , 3              },
  {"i32.trunc_sat_f32_u"         , 3              },
  {"i32.trunc_sat_f64_s"         , 3              },
  {"i32.trunc_sat_f64_u"         , 3              },
  {"i32.wrap_i64"                , 3              },
  {"i32.xor"                     , 1              },
  {"i32x4.add"                   , 100000         },
  {"i32x4.all_true"              , 100000         },
  {"i32x4.any_true"              , 100000         },
  {"i32x4.eq"                    , 100000         },
  {"i32x4.extract_lane"          , 100000         },
  {"i32x4.ge_s"                  , 100000         },
  {"i32x4.ge_u"                  , 100000         },
  {"i32x4.gt_s"                  , 100000         },
  {"i32x4.gt_u"                  , 100000         },
  {"i32x4.le_s"                  , 100000         },
  {"i32x4.le_u"                  , 100000         },
  {"i32x4.lt_s"                  , 100000         },
  {"i32x4.lt_u"                  , 100000         },
  {"i32x4.mul"                   , 100000         },
  {"i32x4.ne"                    , 100000         },
  {"i32x4.neg"                   , 100000         },
  {"i32x4.replace_lane"          , 100000         },
  {"i32x4.shl"                   , 100000         },
  {"i32x4.shr_s"                 , 100000         },
  {"i32x4.shr_u"                 , 100000         },
  {"i32x4.splat"                 , 100000         },
  {"i32x4.sub"                   , 100000         },
  {"i32x4.trunc_sat_f32x4_s"     , 100000         },
  {"i32x4.trunc_sat_f32x4_u"     , 100000         },
  {"i64.add"                     , 1              },
  {"i64.and"                     , 1              },
  {"i64.atomic.load"             , 100000         },
  {"i64.atomic.load16_u"         , 100000         },
  {"i64.atomic.load32_u"         , 100000         },
  {"i64.atomic.load8_u"          , 100000         },
  {"i64.atomic.rmw.add"          , 100000         },
  {"i64.atomic.rmw.and"          , 100000         },
  {"i64.atomic.rmw.cmpxchg"      , 100000         },
  {"i64.atomic.rmw.or"           , 100000         },
  {"i64.atomic.rmw.sub"          , 100000         },
  {"i64.atomic.rmw.xchg"         , 100000         },
  {"i64.atomic.rmw.xor"          , 100000         },
  {"i64.atomic.rmw16.add_u"      , 100000         },
  {"i64.atomic.rmw16.and_u"      , 100000         },
  {"i64.atomic.rmw16.cmpxchg_u"  , 100000         },
  {"i64.atomic.rmw16.or_u"       , 100000         },
  {"i64.atomic.rmw16.sub_u"      , 100000         },
  {"i64.atomic.rmw16.xchg_u"     , 100000         },
  {"i64.atomic.rmw16.xor_u"      , 100000         },
  {"i64.atomic.rmw32.add_u"      , 100000         },
  {"i64.atomic.rmw32.and_u"      , 100000         },
  {"i64.atomic.rmw32.cmpxchg_u"  , 100000         },
  {"i64.atomic.rmw32.or_u"       , 100000         },
  {"i64.atomic.rmw32.sub_u"      , 100000         },
  {"i64.atomic.rmw32.xchg_u"     , 100000         },
  {"i64.atomic.rmw32.xor_u"      , 100000         },
  {"i64.atomic.rmw8.add_u"       , 100000         },
  {"i64.atomic.rmw8.and_u"       , 100000         },
  {"i64.atomic.rmw8.cmpxchg_u"   , 100000         },
  {"i64.atomic.rmw8.or_u"        , 100000         },
  {"i64.atomic.rmw8.sub_u"       , 100000         },
  {"i64.atomic.rmw8.xchg_u"      , 100000         },
  {"i64.atomic.rmw8.xor_u"       , 100000         },
  {"i64.atomic.store"            , 100000         },
  {"i64.atomic.store16"          , 100000         },
  {"i64.atomic.store32"          , 100000         },
  {"i64.atomic.store8"           , 100000         },
  {"i64.atomic.wait"             , 100000         },
  {"i64.clz"                     , 105            },
  {"i64.const"                   , 0              },
  {"i64.ctz"                     , 105            },
  {"i64.div_s"                   , 80             },
  {"i64.div_u"                   , 80             },
  {"i64.eq"                      , 1              },
  {"i64.eqz"                     , 1              },
  {"i64.extend16_s"              , 3              },
  {"i64.extend32_s"              , 3              },
  {"i64.extend8_s"               , 3              },
  {"i64.extend_i32_s"            , 3              },
  {"i64.extend_i32_u"            , 3              },
  {"i64.ge_s"                    , 1              },
  {"i64.ge_u"                    , 1              },
  {"i64.gt_s"                    , 1              },
  {"i64.gt_u"                    , 1              },
  {"i64.le_s"                    , 1              },
  {"i64.le_u"                    , 1              },
  {"i64.load"                    , 3              },
  {"i64.load16_s"                , 3              },
  {"i64.load16_u"                , 3              },
  {"i64.load32_s"                , 3              },
  {"i64.load32_u"                , 3              },
  {"i64.load8_s"                 , 3              },
  {"i64.load8_u"                 , 3              },
  {"i64.lt_s"                    , 1              },
  {"i64.lt_u"                    , 1              },
  {"i64.mul"                     , 3              },
  {"i64.ne"                      , 1              },
  {"i64.or"                      , 1              },
  {"i64.popcnt"                  , 1              },
  {"i64.reinterpret_f64"         , 3              },
  {"i64.rem_s"                   , 80             },
  {"i64.rem_u"                   , 80             },
  {"i64.rotl"                    , 2              },
  {"i64.rotr"                    , 2              },
  {"i64.shl"                     , 2              },
  {"i64.shr_s"                   , 2              },
  {"i64.shr_u"                   , 2              },
  {"i64.store"                   , 3              },
  {"i64.store16"                 , 3              },
  {"i64.store32"                 , 3              },
  {"i64.store8"                  , 3              },
  {"i64.sub"                     , 1              },
  {"i64.trunc_f32_s"             , 3              },
  {"i64.trunc_f32_u"             , 3              },
  {"i64.trunc_f64_s"             , 3              },
  {"i64.trunc_f64_u"             , 3              },
  {"i64.trunc_sat_f32_s"         , 3              },
  {"i64.trunc_sat_f32_u"         , 3              },
  {"i64.trunc_sat_f64_s"         , 3              },
  {"i64.trunc_sat_f64_u"         , 3              },
  {"i64.xor"                     , 1              },
  {"i64x2.add"                   , 100000         },
  {"i64x2.all_true"              , 100000         },
  {"i64x2.any_true"              , 100000         },
  {"i64x2.extract_lane"          , 100000         },
  {"i64x2.neg"                   , 100000         },
  {"i64x2.replace_lane"          , 100000         },
  {"i64x2.shl"                   , 100000         },
  {"i64x2.shr_s"                 , 100000         },
  {"i64x2.shr_u"                 , 100000         },
  {"i64x2.splat"                 , 100000         },
  {"i64x2.sub"                   , 100000         },
  {"i64x2.trunc_sat_f64x2_s"     , 100000         },
  {"i64x2.trunc_sat_f64x2_u"     , 100000         },
  {"i8x16.add"                   , 100000         },
  {"i8x16.add_saturate_s"        , 100000         },
  {"i8x16.add_saturate_u"        , 100000         },
  {"i8x16.all_true"              , 100000         },
  {"i8x16.any_true"              , 100000         },
  {"i8x16.eq"                    , 100000         },
  {"i8x16.extract_lane_s"        , 100000         },
  {"i8x16.extract_lane_u"        , 100000         },
  {"i8x16.ge_s"                  , 100000         },
  {"i8x16.ge_u"                  , 100000         },
  {"i8x16.gt_s"                  , 100000         },
  {"i8x16.gt_u"                  , 100000         },
  {"i8x16.le_s"                  , 100000         },
  {"i8x16.le_u"                  , 100000         },
  {"i8x16.lt_s"                  , 100000         },
  {"i8x16.lt_u"                  , 100000         },
  {"i8x16.mul"                   , 100000         },
  {"i8x16.ne"                    , 100000         },
  {"i8x16.neg"                   , 100000         },
  {"i8x16.replace_lane"          , 100000         },
  {"i8x16.shl"                   , 100000         },
  {"i8x16.shr_s"                 , 100000         },
  {"i8x16.shr_u"                 , 100000         },
  {"i8x16.splat"                 , 100000         },
  {"i8x16.sub"                   , 100000         },
  {"i8x16.sub_saturate_s"        , 100000         },
  {"i8x16.sub_saturate_u"        , 100000         },
  {"if"                          , 0              },
  {"local.get"                   , 3              },
  {"local.set"                   , 3              },
  {"local.tee"                   , 3              },
  {"loop"                        , 0              },
  {"memory.copy"                 , 100000         },
  {"memory.fill"                 , 100000         },
  {"memory.grow"                 , 100000         },
  {"memory.init"                 , 100000         },
  {"memory.size"                 , 2              },
  {"nop"                         , 0              },
  {"ref.is_null"                 , 100000         },
  {"ref.null"                    , 100000         },
  {"ref.func"                    , 100000         },
  {"rethrow"                     , 100000         },
  {"return"                      , 2              },
  {"return_call"                 , 100000         },
  {"return_call_indirect"        , 100000         },
  {"select"                      , 3              },
  {"table.copy"                  , 100000         },
  {"table.get"                   , 100000         },
  {"table.grow"                  , 100000         },
  {"table.init"                  , 100000         },
  {"table.set"                   , 100000         },
  {"table.size"                  , 100000         },
  {"table.fill"                  , 100000         },
  {"throw"                       , 100000         },
  {"try"                         , 100000         },
  {"unreachable"                 , 0              },
  {"v128.and"                    , 100000         },
  {"v128.bitselect"              , 100000         },
  {"v128.const"                  , 100000         },
  {"v128.load"                   , 100000         },
  {"v128.not"                    , 100000         },
  {"v128.or"                     , 100000         },
  {"v128.store"                  , 100000         },
  {"v128.xor"                    , 100000         },
  {"v8x16.shuffle"               , 100000         },
  {"v8x16.shuffle1"              , 100000         },
  {"v8x16.shuffle2_imm"          , 100000         },
};
